﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace com.ReinforceLab.AudioModem.LinkLayer
{/*
    class SliceFilter
    { 
        #region Variables        
        const int _sliceLevel = 1000;
        bool _cmpSig;
        #endregion

        #region Constructor
        public SliceFilter()
        {
            _cmpSig = false;
        }
        #endregion

        #region Public methods
        public int[] Filter(int[] waveform)
        {
            var demod_sig = new List<int>();
            foreach (var sig in waveform)
            {
                _cmpSig = _cmpSig ? (sig > -1 * _sliceLevel) : (sig > _sliceLevel);
                demod_sig.Add(_cmpSig ? 1 : -1);
            }

            return demod_sig.ToArray();
        }
        #endregion
    }*/
}